<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JCSDK Objective-C API Reference for iOS/macOS: JCMessageChannel类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JCSDK Objective-C API Reference for iOS/macOS
   &#160;<span id="projectnumber">2.3.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">构造函数</a> &#124;
<a href="#pub-static-methods">类方法</a> &#124;
<a href="#properties">属性</a> &#124;
<a href="interface_j_c_message_channel-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">JCMessageChannel类 参考<div class="ingroups"><a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html">消息通道模块</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#import &lt;<a class="el" href="_j_c_message_channel_8h_source.html">JCMessageChannel.h</a>&gt;</code></p>
<div class="dynheader">
类 JCMessageChannel 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interface_j_c_message_channel.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
构造函数</h2></td></tr>
<tr class="memitem:ab84f3affc5ddc36f40cd23cfb97b18ee"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_j_c_message_channel_item.html">JCMessageChannelItem</a> *__nullable)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#ab84f3affc5ddc36f40cd23cfb97b18ee">sendMessage:keyId:messageType:text:extraParams:cookie:atAll:atServerUidList:</a></td></tr>
<tr class="separator:ab84f3affc5ddc36f40cd23cfb97b18ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fecaa87aaa6be8e27173c6f9225c054"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_j_c_message_channel_item.html">JCMessageChannelItem</a> *__nullable)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#a0fecaa87aaa6be8e27173c6f9225c054">sendFile:keyId:messageType:fileUri:thumbUri:size:duration:extraParams:cookie:atAll:atServerUidList:</a></td></tr>
<tr class="separator:a0fecaa87aaa6be8e27173c6f9225c054"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56565c7d1d12ed4518da619d1493f2d5"><td class="memItemLeft" align="right" valign="top">(int)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#a56565c7d1d12ed4518da619d1493f2d5">refreshConversation:lastQueryTime:</a></td></tr>
<tr class="separator:a56565c7d1d12ed4518da619d1493f2d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabdc7f5d60b3a7b2cc2396922d3b6575"><td class="memItemLeft" align="right" valign="top">(int)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#aabdc7f5d60b3a7b2cc2396922d3b6575">fetchMessages:startMessageId:count:pack:</a></td></tr>
<tr class="separator:aabdc7f5d60b3a7b2cc2396922d3b6575"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6195a64ec54b63011129bcf221b3be"><td class="memItemLeft" align="right" valign="top">(int)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#a2c6195a64ec54b63011129bcf221b3be">markReadMessage:messageId:isGroup:</a></td></tr>
<tr class="separator:a2c6195a64ec54b63011129bcf221b3be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a817de33a2a86fcd0d1c30648e9c000f2"><td class="memItemLeft" align="right" valign="top">(int)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#a817de33a2a86fcd0d1c30648e9c000f2">markRecvMessage:messageId:</a></td></tr>
<tr class="separator:a817de33a2a86fcd0d1c30648e9c000f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a826f73531b0ff987b856022403d07d2d"><td class="memItemLeft" align="right" valign="top">(int)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_message_channel.html#a826f73531b0ff987b856022403d07d2d">withdrawalMessage:messageId:content:</a></td></tr>
<tr class="separator:a826f73531b0ff987b856022403d07d2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
类方法</h2></td></tr>
<tr class="memitem:ad9690d124324d7feda64df75723ec595"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> *__nullable)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_j_c_message_channel.html#ad9690d124324d7feda64df75723ec595">create:callback:</a></td></tr>
<tr class="separator:ad9690d124324d7feda64df75723ec595"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78e87696e1dffb30a286f33fb6011bd7"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_j_c_message_channel.html#a78e87696e1dffb30a286f33fb6011bd7">destroy</a></td></tr>
<tr class="separator:a78e87696e1dffb30a286f33fb6011bd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
属性</h2></td></tr>
<tr class="memitem:a7bbd9ce45010a827acd589063b5469dd"><td class="memItemLeft" align="right" valign="top">NSString *__nonnull&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_j_c_message_channel.html#a7bbd9ce45010a827acd589063b5469dd">thumbDir</a></td></tr>
<tr class="separator:a7bbd9ce45010a827acd589063b5469dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>消息通道类，包括一对一消息和群组消息 </p>
</div><h2 class="groupheader">函数文档</h2>
<a id="ad9690d124324d7feda64df75723ec595"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9690d124324d7feda64df75723ec595">&#9670;&nbsp;</a></span>create:callback:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a>* __nullable) create: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_j_c_client.html">JCClient</a> *__nonnull)&#160;</td>
          <td class="paramname"><em>client</em></td>
        </tr>
        <tr>
          <td class="paramkey">callback:</td>
          <td></td>
          <td class="paramtype">(id&lt; <a class="el" href="protocol_j_c_message_channel_callback-p.html">JCMessageChannelCallback</a> &gt; __nonnull)&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 <a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 对象</p>
<p><a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 的所有接口函数，如无特殊说明，都建议在主线程调用</p>
<dl class="section note"><dt>注解</dt><dd><ul>
<li>调用此方法创建 <a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 对象后，期间没有调用过 <a class="el" href="interface_j_c_message_channel.html#a78e87696e1dffb30a286f33fb6011bd7">destroy</a> 方法销毁对象，然后又重复调用此方法，会直接返回第一次创建的 <a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 对象</li>
<li>调用此方法前确保 <a class="el" href="interface_j_c_client.html">JCClient</a> 已完成初始化，即 <a class="el" href="interface_j_c_client.html#af428728decbaf19a2ac6552a07351a65">state</a> 状态值不等于 <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga485360c806cb3a83e41ac56a9ad7e709a5a6b582ba8275e39567b419ce05b7860">JCClientStateNotInit</a></li>
</ul>
</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td><a class="el" href="interface_j_c_client.html">JCClient</a> 对象 </td></tr>
    <tr><td class="paramname">callback</td><td><a class="el" href="protocol_j_c_message_channel_callback-p.html">JCMessageChannelCallback</a> 回调接口，用于回调相关通知 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回 <a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 对象 </dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">JCClient、JCMessageChannelCallback 任意一个参数传空就会出现调用异常</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a78e87696e1dffb30a286f33fb6011bd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78e87696e1dffb30a286f33fb6011bd7">&#9670;&nbsp;</a></span>destroy</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (void) destroy </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>销毁 <a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 对象</p>
<dl class="section note"><dt>注解</dt><dd>此方法为异步调用，所以在调用此方法后不能马上调用 <a class="el" href="interface_j_c_message_channel.html#ad9690d124324d7feda64df75723ec595">create</a> 方法去重新创建 <a class="el" href="interface_j_c_message_channel.html">JCMessageChannel</a> 对象 </dd></dl>

</div>
</div>
<a id="aabdc7f5d60b3a7b2cc2396922d3b6575"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabdc7f5d60b3a7b2cc2396922d3b6575">&#9670;&nbsp;</a></span>fetchMessages:startMessageId:count:pack:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (int) fetchMessages: </td>
          <td></td>
          <td class="paramtype">(nonnull NSString *)&#160;</td>
          <td class="paramname"><em>serverUid</em></td>
        </tr>
        <tr>
          <td class="paramkey">startMessageId:</td>
          <td></td>
          <td class="paramtype">(long)&#160;</td>
          <td class="paramname"><em>startMessageId</em></td>
        </tr>
        <tr>
          <td class="paramkey">count:</td>
          <td></td>
          <td class="paramtype">(int)&#160;</td>
          <td class="paramname"><em>count</em></td>
        </tr>
        <tr>
          <td class="paramkey">pack:</td>
          <td></td>
          <td class="paramtype">(bool)&#160;</td>
          <td class="paramname"><em>pack</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取历史消息</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">serverUid</td><td>用户 serverUid 或者群组的 serverUid </td></tr>
    <tr><td class="paramname">startMessageId</td><td>起始消息ID，如果-1从最新开始拉取 </td></tr>
    <tr><td class="paramname">count</td><td>拉取历史消息条数 </td></tr>
    <tr><td class="paramname">pack</td><td>消息列表是否一次性返回 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>&gt;0：操作id，结果通过 <a class="el" href="protocol_j_c_message_channel_callback-p.html#a867c21568aa9c37cb78c7b6d6db4b5ed">onFetchMessageResult</a> 通知</li>
<li>-1：调用失败，不会收到回调 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a2c6195a64ec54b63011129bcf221b3be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c6195a64ec54b63011129bcf221b3be">&#9670;&nbsp;</a></span>markReadMessage:messageId:isGroup:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (int) markReadMessage: </td>
          <td></td>
          <td class="paramtype">(nonnull NSString *)&#160;</td>
          <td class="paramname"><em>serverUid</em></td>
        </tr>
        <tr>
          <td class="paramkey">messageId:</td>
          <td></td>
          <td class="paramtype">(long)&#160;</td>
          <td class="paramname"><em>messageId</em></td>
        </tr>
        <tr>
          <td class="paramkey">isGroup:</td>
          <td></td>
          <td class="paramtype">(bool)&#160;</td>
          <td class="paramname"><em>isGroup</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>标志消息为已读</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">serverUid</td><td>用户 serverUid 或者群组的 serverUid </td></tr>
    <tr><td class="paramname">messageId</td><td>消息ID，如果-1表示最后一条消息 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>&gt;0：操作id，结果通过 <a class="el" href="protocol_j_c_message_channel_callback-p.html#ad362d43fde62e1264204788b8763af2a">onMarkReadResult</a> 通知</li>
<li>-1：调用失败，不会收到回调 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a817de33a2a86fcd0d1c30648e9c000f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a817de33a2a86fcd0d1c30648e9c000f2">&#9670;&nbsp;</a></span>markRecvMessage:messageId:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (int) markRecvMessage: </td>
          <td></td>
          <td class="paramtype">(nonnull NSString *)&#160;</td>
          <td class="paramname"><em>serverUid</em></td>
        </tr>
        <tr>
          <td class="paramkey">messageId:</td>
          <td></td>
          <td class="paramtype">(long)&#160;</td>
          <td class="paramname"><em>messageId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>标志消息为已收</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">serverUid</td><td>用户 serverUid 或者群组的 serverUid </td></tr>
    <tr><td class="paramname">messageId</td><td>消息ID，如果-1表示最后一条消息 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>&gt;0：操作id，结果通过 <a class="el" href="protocol_j_c_message_channel_callback-p.html#a0a365fcdc004e47db56794e84b236b94">onMarkRecvResult</a> 通知</li>
<li>-1：调用失败，不会收到回调 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a56565c7d1d12ed4518da619d1493f2d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56565c7d1d12ed4518da619d1493f2d5">&#9670;&nbsp;</a></span>refreshConversation:lastQueryTime:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (int) refreshConversation: </td>
          <td></td>
          <td class="paramtype">(NSString *__nullable)&#160;</td>
          <td class="paramname"><em>serverUid</em></td>
        </tr>
        <tr>
          <td class="paramkey">lastQueryTime:</td>
          <td></td>
          <td class="paramtype">(long)&#160;</td>
          <td class="paramname"><em>lastQueryTime</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取消息会话</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">serverUid</td><td>用户 <a class="el" href="interface_j_c_client.html#a30719cf88f438e003688e2b6962fa28c">serverUid</a> 或者群组的 <a class="el" href="interface_j_c_group_item.html#a5478b1fba3fe9018b39b3511a66fe8c0">groupId</a>，传 null返回全部 </td></tr>
    <tr><td class="paramname">lastQueryTime</td><td>上次查询返回的时间，单位毫秒 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>&gt;0：操作id，结果通过 <a class="el" href="protocol_j_c_message_channel_callback-p.html#aa7c03f499a147afe54d42cfbc49b9614">onRefreshConversation</a> 通知</li>
<li>-1：调用失败，不会收到回调 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a0fecaa87aaa6be8e27173c6f9225c054"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fecaa87aaa6be8e27173c6f9225c054">&#9670;&nbsp;</a></span>sendFile:keyId:messageType:fileUri:thumbUri:size:duration:extraParams:cookie:atAll:atServerUidList:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_j_c_message_channel_item.html">JCMessageChannelItem</a>* __nullable) sendFile: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#gaf3c09a60029d0e8dae56658b90f7d0f4">JCMessageChannelType</a>)&#160;</td>
          <td class="paramname"><em>type</em></td>
        </tr>
        <tr>
          <td class="paramkey">keyId:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>keyId</em></td>
        </tr>
        <tr>
          <td class="paramkey">messageType:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>messageType</em></td>
        </tr>
        <tr>
          <td class="paramkey">fileUri:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>fileUri</em></td>
        </tr>
        <tr>
          <td class="paramkey">thumbUri:</td>
          <td></td>
          <td class="paramtype">(NSString *__nullable)&#160;</td>
          <td class="paramname"><em>thumbUri</em></td>
        </tr>
        <tr>
          <td class="paramkey">size:</td>
          <td></td>
          <td class="paramtype">(int)&#160;</td>
          <td class="paramname"><em>size</em></td>
        </tr>
        <tr>
          <td class="paramkey">duration:</td>
          <td></td>
          <td class="paramtype">(int)&#160;</td>
          <td class="paramname"><em>duration</em></td>
        </tr>
        <tr>
          <td class="paramkey">extraParams:</td>
          <td></td>
          <td class="paramtype">(NSDictionary *__nullable)&#160;</td>
          <td class="paramname"><em>extraParams</em></td>
        </tr>
        <tr>
          <td class="paramkey">cookie:</td>
          <td></td>
          <td class="paramtype">(id __nullable)&#160;</td>
          <td class="paramname"><em>cookie</em></td>
        </tr>
        <tr>
          <td class="paramkey">atAll:</td>
          <td></td>
          <td class="paramtype">(bool)&#160;</td>
          <td class="paramname"><em>atAll</em></td>
        </tr>
        <tr>
          <td class="paramkey">atServerUidList:</td>
          <td></td>
          <td class="paramtype">(NSArray&lt; NSString * &gt; *__nullable)&#160;</td>
          <td class="paramname"><em>atServerUidList</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>发送文件消息</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>类型：<ul>
<li><a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4ae81260071eb3d169c0632cd2e21dd68c">JCMessageChannelType1To1</a> : 一对一消息</li>
<li><a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4abe536cdae1691690b82cbbcc42474d34">JCMessageChannelTypeGroup</a> : 群组消息 </li>
</ul>
</td></tr>
    <tr><td class="paramname">keyId</td><td>对方唯一标识<ul>
<li>当 type 为 <a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4ae81260071eb3d169c0632cd2e21dd68c">JCMessageChannelType1To1</a> 时为对方的 serverUid</li>
<li>当 type 为 <a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4abe536cdae1691690b82cbbcc42474d34">JCMessageChannelTypeGroup</a> 时为群组的 serverUid </li>
</ul>
</td></tr>
    <tr><td class="paramname">messageType</td><td>文件消息类型，用户可以自定义，例如image，video等 </td></tr>
    <tr><td class="paramname">fileUri</td><td>文件链接地址 </td></tr>
    <tr><td class="paramname">thumbUri</td><td>缩略图文件链接地址 </td></tr>
    <tr><td class="paramname">size</td><td>文件大小(字节) </td></tr>
    <tr><td class="paramname">duration</td><td>文件时长，针对语音，视频等消息 </td></tr>
    <tr><td class="paramname">extraParams</td><td>自定义参数集 </td></tr>
    <tr><td class="paramname">cookie</td><td>标志数据 </td></tr>
    <tr><td class="paramname">atAll</td><td>是否@群体成员，针对群消息 </td></tr>
    <tr><td class="paramname">atUidList</td><td>"@"成员的serverUid列表 针对群消息 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>成功返回 <a class="el" href="interface_j_c_message_channel_item.html">JCMessageChannelItem</a> 对象，并且会收到 <a class="el" href="protocol_j_c_message_channel_callback-p.html#ad43a1826244ac807b4d546ad47181791">onMessageSendUpdate</a> 通知</li>
<li>失败返回 null </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ab84f3affc5ddc36f40cd23cfb97b18ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab84f3affc5ddc36f40cd23cfb97b18ee">&#9670;&nbsp;</a></span>sendMessage:keyId:messageType:text:extraParams:cookie:atAll:atServerUidList:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_j_c_message_channel_item.html">JCMessageChannelItem</a>* __nullable) sendMessage: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#gaf3c09a60029d0e8dae56658b90f7d0f4">JCMessageChannelType</a>)&#160;</td>
          <td class="paramname"><em>type</em></td>
        </tr>
        <tr>
          <td class="paramkey">keyId:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>keyId</em></td>
        </tr>
        <tr>
          <td class="paramkey">messageType:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>messageType</em></td>
        </tr>
        <tr>
          <td class="paramkey">text:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>text</em></td>
        </tr>
        <tr>
          <td class="paramkey">extraParams:</td>
          <td></td>
          <td class="paramtype">(NSDictionary *__nullable)&#160;</td>
          <td class="paramname"><em>extraParams</em></td>
        </tr>
        <tr>
          <td class="paramkey">cookie:</td>
          <td></td>
          <td class="paramtype">(id __nullable)&#160;</td>
          <td class="paramname"><em>cookie</em></td>
        </tr>
        <tr>
          <td class="paramkey">atAll:</td>
          <td></td>
          <td class="paramtype">(bool)&#160;</td>
          <td class="paramname"><em>atAll</em></td>
        </tr>
        <tr>
          <td class="paramkey">atServerUidList:</td>
          <td></td>
          <td class="paramtype">(NSArray&lt; NSString * &gt; *__nullable)&#160;</td>
          <td class="paramname"><em>atServerUidList</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>发送文本消息</p>
<dl class="section note"><dt>注解</dt><dd>文本内容不要超过10KB</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>类型:<ul>
<li><a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4ae81260071eb3d169c0632cd2e21dd68c">JCMessageChannelType1To1</a> : 一对一消息</li>
<li><a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4abe536cdae1691690b82cbbcc42474d34">JCMessageChannelTypeGroup</a> : 群组消息 </li>
</ul>
</td></tr>
    <tr><td class="paramname">keyId</td><td>对方唯一标识:<ul>
<li>当 type 为 <a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4ae81260071eb3d169c0632cd2e21dd68c">JCMessageChannelType1To1</a> 时为对方的 serverUid</li>
<li>当 type 为 <a class="el" href="group___xE6_xB6_x88_xE6_x81_xAF_xE9_x80_x9A_xE9_x81_x93_xE6_xA8_xA1_xE5_x9D_x97.html#ggaf3c09a60029d0e8dae56658b90f7d0f4abe536cdae1691690b82cbbcc42474d34">JCMessageChannelTypeGroup</a> 时为群组的 serverUid </li>
</ul>
</td></tr>
    <tr><td class="paramname">messageType</td><td>文本消息类型，用户可以自定义，例如text，xml等 </td></tr>
    <tr><td class="paramname">text</td><td>文本内容 </td></tr>
    <tr><td class="paramname">extraParams</td><td>自定义参数集 </td></tr>
    <tr><td class="paramname">cookie</td><td>标志数据 </td></tr>
    <tr><td class="paramname">atAll</td><td>是否@群体成员，针对群消息 </td></tr>
    <tr><td class="paramname">atServerUidList</td><td>"@"成员的serverUid列表 针对群消息 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>成功返回 <a class="el" href="interface_j_c_message_channel_item.html">JCMessageChannelItem</a> 对象，并且会收到 <a class="el" href="protocol_j_c_message_channel_callback-p.html#ad43a1826244ac807b4d546ad47181791">onMessageSendUpdate</a> 通知</li>
<li>异常返回 null </li>
</ul>
</dd></dl>

</div>
</div>
<a id="a826f73531b0ff987b856022403d07d2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a826f73531b0ff987b856022403d07d2d">&#9670;&nbsp;</a></span>withdrawalMessage:messageId:content:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (int) withdrawalMessage: </td>
          <td></td>
          <td class="paramtype">(nonnull NSString *)&#160;</td>
          <td class="paramname"><em>serverUid</em></td>
        </tr>
        <tr>
          <td class="paramkey">messageId:</td>
          <td></td>
          <td class="paramtype">(long)&#160;</td>
          <td class="paramname"><em>messageId</em></td>
        </tr>
        <tr>
          <td class="paramkey">content:</td>
          <td></td>
          <td class="paramtype">(NSString *__nonnull)&#160;</td>
          <td class="paramname"><em>content</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>撤回消息</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">serverUid</td><td>用户 serverUid 或者群组的 serverUid </td></tr>
    <tr><td class="paramname">messageId</td><td>消息ID </td></tr>
    <tr><td class="paramname">content</td><td>文本内容 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>&gt;0：操作id，结果通过 <a class="el" href="protocol_j_c_message_channel_callback-p.html#aba72ea7f5832917b9189d2b5d0fd3f27">onDrawBackMessageResult</a> 通知</li>
<li>-1：调用失败，不会收到回调 </li>
</ul>
</dd></dl>

</div>
</div>
<h2 class="groupheader">属性说明</h2>
<a id="a7bbd9ce45010a827acd589063b5469dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7bbd9ce45010a827acd589063b5469dd">&#9670;&nbsp;</a></span>thumbDir</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (NSString* __nonnull) thumbDir</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">write</span><span class="mlabel">nonatomic</span><span class="mlabel">copy</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>缩率图保存路径</p>
<p>初始化会默认设置，同时用户可以自己设置 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>JCSDKOC/JCSDKOC/JCMessageChannel/<a class="el" href="_j_c_message_channel_8h_source.html">JCMessageChannel.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
